﻿using LView.CMS.Core;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;

namespace LView.CMS.Models
{
    public class LTask
    {
        /// <summary>
        /// 任务Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        [MongoIndex("IDX_LTask_Name")]
        public string Name { get; set; }

        /// <summary>
        /// 任务描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 任务创建时间
        /// </summary>
        [BsonDateTimeOptions(Kind = DateTimeKind.Local)]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 任务创建人
        /// </summary>
        public string CreateUserId { get; set; }

        /// <summary>
        /// 任务创建人
        /// </summary>
        public string CreateUserName { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string DIR { get; set; }

        /// <summary>
        /// 任务结束时间
        /// </summary>
        [BsonDateTimeOptions(Kind = DateTimeKind.Local)]
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 分类信息
        /// </summary>
        public List<Category> Category { get; set; }

        /// <summary>
        /// 0 编辑中, 1 已发布 (已发布不可改,编辑中不可分配)
        /// </summary>
        public int Type { get; set; }
    }
    /// <summary>
    /// 分类
    /// </summary>
    public class Category
    {
        /// <summary>
        /// 分类ID
        /// </summary>
        public string CategoryId { get; set; }

        /// <summary>
        /// 分类名:员工手册学习培训
        /// </summary>
        [MongoIndex("IDX_Category_Name")]
        public string Name { get; set; }

        /// <summary>
        /// 分类描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 类别总学时
        /// </summary>
        public int CategoryPeriodMin { get; set; }

        /// <summary>
        /// 类别总学分
        /// </summary>
        public int CategoryScore { get; set; }

        /// <summary>
        /// 教程,小任务集合
        /// </summary>
        public List<Course> Course { get; set; }
    }
    /// <summary>
    /// 教程
    /// </summary>
    public class Course
    {
        /// <summary>
        /// 教程ID
        /// </summary>
        [MongoIndex("IDX_Course_Id")]
        public string CourseId { get; set; }

        /// <summary>
        /// 教程名称
        /// </summary>
        [MongoIndex("IDX_Course_Name")]
        public string Name { get; set; }

        /// <summary>
        /// 考试:exam  培训:train
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 课程学时
        /// </summary>
        public int CoursePeriod { get; set; }

        /// <summary>
        /// 课程学分
        /// </summary>
        public int CourseScore { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 文件Id （当查看培训的时候,展示的文件）
        /// </summary>
        public string FileId { get; set; }
        /// <summary>
        /// 试卷Id （当考试的时候,展示的试卷）
        /// </summary>
        public string ExamId { get; set; }
    }
}
